﻿using Core.Caching;

namespace Core.Identity.UserProfiles.Caching;

public static class UserProfilesCacheKey
{
    public const string GetAllCacheKey = "all-user-profiles";

    public static string GetUserProfileCacheKey(string userId)
    {
        return $"UserProfilesCacheKey:GetUserProfileByIdQuery,{userId}";
    }

    public static IEnumerable<string>? Tags => new string[] { "user-profile" };

    public static void Refresh()
    {
        CacheFactory.RemoveByTags(Tags);
    }
}
